package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.GroupMemberActivity;
import com.wwtech.epp.ui.activity.friend.contract.GroupMemberContract;
import com.wwtech.epp.ui.activity.friend.presenter.GroupMemberPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of GroupMemberActivity, provide field for GroupMemberActivity
 * @date 2017/10/23 20:37:58
 */
@Module
public class GroupMemberModule {
    private final GroupMemberContract.View mView;


    public GroupMemberModule(GroupMemberContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public GroupMemberPresenter provideGroupMemberPresenter(HttpAPIWrapper httpAPIWrapper, GroupMemberActivity mActivity) {
        return new GroupMemberPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public GroupMemberActivity provideGroupMemberActivity() {
        return (GroupMemberActivity) mView;
    }
}